import { get, post } from "../utils/request";

// 获取用户信息
// const getUserInfo = () => post("mgt/4A/getUserInfo");
const getUserInfo = () => get("mgt/4A/getUserAndExtUserByCode");
// 退出登陆
const logout = () => get("mgt/logout");

// const getMenu = () => post("mgt/4A/getAuthorityUrl");
const getMenu = () => get("mgt/4A/getAuthByUser");

const idaasSyncData = () => get("mgt/4A/sync/4AData");
const getTenantList = (userId) => get("mgt/base/tenant/user", { userId });

const getColumnsByTable = data => post("mgt/listPageConfig/queryConfig", data);

const updateColumnsByTable = data => post("mgt/listPageConfig/save", data);

export default {
  getUserInfo,
  logout,
  getMenu,
  idaasSyncData,
  getTenantList,
  getColumnsByTable,
  updateColumnsByTable
};
